Page({

  /**
   * 页面的初始数据
   */
  data: {
    sign: null,
    ispopupShow: false,
    CjstateValue: '',
    CjstateIndex: 0,
    FirmValue:'',
    CodingValue: '',
    columnsCjState: [{
      id: 0,
      text: '按层级搜索'
    }, {
      id: 1,
      text: '选项一'
    }, {
      id: 2,
      text: '选项二'
    }],
    customStyleSelect: "padding:0 0 0 20rpx;height: 100%;width:100%;color:#808285;",
  },
  onClickInput(e) {
    let that = this
    that.setData({
      sign: e.currentTarget.dataset.sign,
      ispopupShow: true
    })
  },
  cancelpicker(e) {
    let that = this
    that.setData({
      ispopupShow: false
    })
    setTimeout(() => {
      that.setData({
        sign: null
      })
    }, 200)
  },
  //层级
  onConfirmCjState(event) {
    let that = this
    that.setData({
      CjstateIndex: event.detail.index,
      CjstateValue: event.detail.value.id == 0 ? '' : event.detail.value.text,
      ispopupShow: false
    })
  },
  //公司名称
  onFirmChange(e){
    let that = this
    that.setData({
      FirmValue:e.detail
    })
  },
  //设备编码
  onCodingChange(e) {
    let that = this
    that.setData({
      CodingValue: e.detail
    })
  },
  Querystation() {
    let that = this
    let queryParams = {}
    queryParams.CjstateValue = that.data.CjstateValue
    queryParams.CodingValue = that.data.CodingValue
    queryParams.FirmValue = that.data.FirmValue
    console.log('搜索电站',queryParams);
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})